<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AIfES 2: aiopti_sgd.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="AIfES_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">AIfES 2
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('aiopti__sgd_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">aiopti_sgd.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="aiopti__sgd_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"><a class="line" href="aiopti__sgd_8h.html#a61b25438699bd6f918253a70b0e92973">    1</a></span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#ifndef AIOPTI_SGD</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="preprocessor">#define AIOPTI_SGD</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160; </div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="aifes__core_8h.html">core/aifes_core.h</a>&quot;</span></div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160; </div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structaiopti__sgd.html">aiopti_sgd</a>   <a class="code" href="structaiopti__sgd.html">aiopti_sgd_t</a>; </div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="structaiopti__sgd.html">   56</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structaiopti__sgd.html">aiopti_sgd</a> {</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="structaiopti__sgd.html#a76e9fa4cf381a685a5df819a57737e64">   57</a></span>&#160;    <a class="code" href="structaiopti.html">aiopti_t</a> <a class="code" href="structaiopti__sgd.html#a76e9fa4cf381a685a5df819a57737e64">base</a>; </div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="structaiopti__sgd.html#a4be2a7d03bb9aeca3a064739b167098a">   65</a></span>&#160;    <span class="keywordtype">void</span> *<a class="code" href="structaiopti__sgd.html#a4be2a7d03bb9aeca3a064739b167098a">momentum</a>; </div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160; </div>
<div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="structaiopti__sgd.html#a5f5b55cad6c306233a8e4510d1773244">   80</a></span>&#160;    void (*<a class="code" href="structaiopti__sgd.html#a5f5b55cad6c306233a8e4510d1773244">tensor_sub</a>)(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *a, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *b, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160; </div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="structaiopti__sgd.html#a7674445f16490c6cacdb03157feab8c7">   89</a></span>&#160;    void (*<a class="code" href="structaiopti__sgd.html#a7674445f16490c6cacdb03157feab8c7">tensor_add</a>)(<span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *a, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *b, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="structaiopti__sgd.html#a2cbbfaac40611a8dd0ec908cc199b388">   98</a></span>&#160;    void (*<a class="code" href="structaiopti__sgd.html#a2cbbfaac40611a8dd0ec908cc199b388">scalar_mul</a>)(<span class="keyword">const</span> <span class="keywordtype">void</span> *scalar, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *a, <a class="code" href="structaitensor.html">aitensor_t</a> *result);</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160; </div>
<div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="structaiopti__sgd.html#aa0c5520df9a1bfa236b1ef7eddeb3553">  107</a></span>&#160;    void (*<a class="code" href="structaiopti__sgd.html#aa0c5520df9a1bfa236b1ef7eddeb3553">zero_tensor</a>)(<a class="code" href="structaitensor.html">aitensor_t</a> *tensor);</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160; </div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;};</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="structaicore__optitype.html">aicore_optitype_t</a> *<a class="code" href="aiopti__sgd_8h.html#aaf53c8e74f356f5f48976f95ba8fbab1">aiopti_sgd_type</a>;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160; </div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160; </div>
<div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="aiopti__sgd_8h.html#a17f3c6d6bc38f5be3d796a787aa4337d">  129</a></span>&#160;<a class="code" href="structaiopti.html">aiopti_t</a> *<a class="code" href="aiopti__sgd_8h.html#a17f3c6d6bc38f5be3d796a787aa4337d">aiopti_sgd</a>(<a class="code" href="structaiopti__sgd.html">aiopti_sgd_t</a> *opti);</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160; </div>
<div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="aiopti__sgd_8h.html#a7f6246c245c9ec247a565d3f42f0b9f4">  143</a></span>&#160;uint32_t <a class="code" href="aiopti__sgd_8h.html#a7f6246c245c9ec247a565d3f42f0b9f4">aiopti_sgd_sizeof_optimem_with_momentum</a>(<a class="code" href="structaiopti.html">aiopti_t</a> *<span class="keyword">self</span>, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *params);</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160; </div>
<div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="aiopti__sgd_8h.html#a5b9de582e0c2d7fd3ebc91515e492baa">  155</a></span>&#160;uint32_t <a class="code" href="aiopti__sgd_8h.html#a5b9de582e0c2d7fd3ebc91515e492baa">aiopti_sgd_sizeof_optimem_without_momentum</a>(<a class="code" href="structaiopti.html">aiopti_t</a> *<span class="keyword">self</span>, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *params);</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160; </div>
<div class="line"><a name="l00174"></a><span class="lineno"><a class="line" href="aiopti__sgd_8h.html#a3ddbd762bf3c1fa7b4bf1af180bf2365">  174</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aiopti__sgd_8h.html#a3ddbd762bf3c1fa7b4bf1af180bf2365">aiopti_sgd_init_optimem_with_momentum</a>(<a class="code" href="structaiopti.html">aiopti_t</a> *<span class="keyword">self</span>, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *params, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *gradients, <span class="keywordtype">void</span> *optimem);</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160; </div>
<div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="aiopti__sgd_8h.html#ac888d4220489192230ae82b3eb928d1a">  187</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aiopti__sgd_8h.html#ac888d4220489192230ae82b3eb928d1a">aiopti_sgd_init_optimem_without_momentum</a>(<a class="code" href="structaiopti.html">aiopti_t</a> *<span class="keyword">self</span>, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *params, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *gradients, <span class="keywordtype">void</span> *optimem);</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160; </div>
<div class="line"><a name="l00203"></a><span class="lineno"><a class="line" href="aiopti__sgd_8h.html#a95ada79ffc34e8ef6567ee3b38a5f8df">  203</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aiopti__sgd_8h.html#a95ada79ffc34e8ef6567ee3b38a5f8df">aiopti_sgd_zero_gradients</a>(<a class="code" href="structaiopti.html">aiopti_t</a> *<span class="keyword">self</span>, <a class="code" href="structaitensor.html">aitensor_t</a> *gradients);</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160; </div>
<div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="aiopti__sgd_8h.html#abea711d9cf9403b45a216c06f9360009">  233</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aiopti__sgd_8h.html#abea711d9cf9403b45a216c06f9360009">aiopti_sgd_update_params_with_momentum</a>(<a class="code" href="structaiopti.html">aiopti_t</a> *<span class="keyword">self</span>, <a class="code" href="structaitensor.html">aitensor_t</a> *params, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *gradients, <span class="keywordtype">void</span> *optimem);</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160; </div>
<div class="line"><a name="l00257"></a><span class="lineno"><a class="line" href="aiopti__sgd_8h.html#aee9b5291db920666251e7556894b79f7">  257</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aiopti__sgd_8h.html#aee9b5291db920666251e7556894b79f7">aiopti_sgd_update_params_without_momentum</a>(<a class="code" href="structaiopti.html">aiopti_t</a> *<span class="keyword">self</span>, <a class="code" href="structaitensor.html">aitensor_t</a> *params, <span class="keyword">const</span> <a class="code" href="structaitensor.html">aitensor_t</a> *gradients, <span class="keywordtype">void</span> *optimem);</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160; </div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;<span class="preprocessor">#ifdef AIDEBUG_PRINT_MODULE_SPECS</span></div>
<div class="line"><a name="l00264"></a><span class="lineno"><a class="line" href="aiopti__sgd_8h.html#a935e38eb3fc504e1c63406b48ad404cd">  264</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="aiopti__sgd_8h.html#a935e38eb3fc504e1c63406b48ad404cd">aiopti_sgd_print_specs</a>(<span class="keyword">const</span> <a class="code" href="structaiopti.html">aiopti_t</a> *<span class="keyword">self</span>);</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// AIDEBUG_PRINT_MODULE_SPECS</span></div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160; </div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// AIOPTI_SGD</span></div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160; </div>
<div class="ttc" id="aaifes__core_8h_html"><div class="ttname"><a href="aifes__core_8h.html">aifes_core.h</a></div><div class="ttdoc">AIfES 2 core interface.</div></div>
<div class="ttc" id="aaiopti__sgd_8h_html_a17f3c6d6bc38f5be3d796a787aa4337d"><div class="ttname"><a href="aiopti__sgd_8h.html#a17f3c6d6bc38f5be3d796a787aa4337d">aiopti_sgd</a></div><div class="ttdeci">aiopti_t * aiopti_sgd(aiopti_sgd_t *opti)</div><div class="ttdoc">Initialize the given SGD optimizer.</div></div>
<div class="ttc" id="aaiopti__sgd_8h_html_a3ddbd762bf3c1fa7b4bf1af180bf2365"><div class="ttname"><a href="aiopti__sgd_8h.html#a3ddbd762bf3c1fa7b4bf1af180bf2365">aiopti_sgd_init_optimem_with_momentum</a></div><div class="ttdeci">void aiopti_sgd_init_optimem_with_momentum(aiopti_t *self, const aitensor_t *params, const aitensor_t *gradients, void *optimem)</div><div class="ttdoc">Initialization of the optimization memory buffer when the momentum is not zero.</div></div>
<div class="ttc" id="aaiopti__sgd_8h_html_a5b9de582e0c2d7fd3ebc91515e492baa"><div class="ttname"><a href="aiopti__sgd_8h.html#a5b9de582e0c2d7fd3ebc91515e492baa">aiopti_sgd_sizeof_optimem_without_momentum</a></div><div class="ttdeci">uint32_t aiopti_sgd_sizeof_optimem_without_momentum(aiopti_t *self, const aitensor_t *params)</div><div class="ttdoc">Calculates the required memory for the optimization step when the momentum is zero.</div></div>
<div class="ttc" id="aaiopti__sgd_8h_html_a7f6246c245c9ec247a565d3f42f0b9f4"><div class="ttname"><a href="aiopti__sgd_8h.html#a7f6246c245c9ec247a565d3f42f0b9f4">aiopti_sgd_sizeof_optimem_with_momentum</a></div><div class="ttdeci">uint32_t aiopti_sgd_sizeof_optimem_with_momentum(aiopti_t *self, const aitensor_t *params)</div><div class="ttdoc">Calculates the required memory for the optimization step when the momentum is not zero.</div></div>
<div class="ttc" id="aaiopti__sgd_8h_html_a935e38eb3fc504e1c63406b48ad404cd"><div class="ttname"><a href="aiopti__sgd_8h.html#a935e38eb3fc504e1c63406b48ad404cd">aiopti_sgd_print_specs</a></div><div class="ttdeci">void aiopti_sgd_print_specs(const aiopti_t *self)</div><div class="ttdoc">Print the optimizer specification.</div></div>
<div class="ttc" id="aaiopti__sgd_8h_html_a95ada79ffc34e8ef6567ee3b38a5f8df"><div class="ttname"><a href="aiopti__sgd_8h.html#a95ada79ffc34e8ef6567ee3b38a5f8df">aiopti_sgd_zero_gradients</a></div><div class="ttdeci">void aiopti_sgd_zero_gradients(aiopti_t *self, aitensor_t *gradients)</div><div class="ttdoc">Set the gradients to zero.</div></div>
<div class="ttc" id="aaiopti__sgd_8h_html_aaf53c8e74f356f5f48976f95ba8fbab1"><div class="ttname"><a href="aiopti__sgd_8h.html#aaf53c8e74f356f5f48976f95ba8fbab1">aiopti_sgd_type</a></div><div class="ttdeci">const aicore_optitype_t * aiopti_sgd_type</div><div class="ttdoc">SGD optimizer type.</div></div>
<div class="ttc" id="aaiopti__sgd_8h_html_abea711d9cf9403b45a216c06f9360009"><div class="ttname"><a href="aiopti__sgd_8h.html#abea711d9cf9403b45a216c06f9360009">aiopti_sgd_update_params_with_momentum</a></div><div class="ttdeci">void aiopti_sgd_update_params_with_momentum(aiopti_t *self, aitensor_t *params, const aitensor_t *gradients, void *optimem)</div><div class="ttdoc">Update the given parameter tensor with respect to the gradients when the momentum is not zero.</div></div>
<div class="ttc" id="aaiopti__sgd_8h_html_ac888d4220489192230ae82b3eb928d1a"><div class="ttname"><a href="aiopti__sgd_8h.html#ac888d4220489192230ae82b3eb928d1a">aiopti_sgd_init_optimem_without_momentum</a></div><div class="ttdeci">void aiopti_sgd_init_optimem_without_momentum(aiopti_t *self, const aitensor_t *params, const aitensor_t *gradients, void *optimem)</div><div class="ttdoc">Initialization of the optimization memory buffer when the momentum is zero.</div></div>
<div class="ttc" id="aaiopti__sgd_8h_html_aee9b5291db920666251e7556894b79f7"><div class="ttname"><a href="aiopti__sgd_8h.html#aee9b5291db920666251e7556894b79f7">aiopti_sgd_update_params_without_momentum</a></div><div class="ttdeci">void aiopti_sgd_update_params_without_momentum(aiopti_t *self, aitensor_t *params, const aitensor_t *gradients, void *optimem)</div><div class="ttdoc">Update the given parameter tensor with respect to the gradients when the momentum is zero.</div></div>
<div class="ttc" id="astructaicore__optitype_html"><div class="ttname"><a href="structaicore__optitype.html">aicore_optitype</a></div><div class="ttdoc">Type indicator of the optimizer to check for the optimizer type.</div><div class="ttdef"><b>Definition:</b> aifes_core.h:160</div></div>
<div class="ttc" id="astructaiopti__sgd_html"><div class="ttname"><a href="structaiopti__sgd.html">aiopti_sgd</a></div><div class="ttdoc">General Stochastic Gradient Descent (SGD) optimizer  struct.</div><div class="ttdef"><b>Definition:</b> aiopti_sgd.h:56</div></div>
<div class="ttc" id="astructaiopti__sgd_html_a2cbbfaac40611a8dd0ec908cc199b388"><div class="ttname"><a href="structaiopti__sgd.html#a2cbbfaac40611a8dd0ec908cc199b388">aiopti_sgd::scalar_mul</a></div><div class="ttdeci">void(* scalar_mul)(const void *scalar, const aitensor_t *a, aitensor_t *result)</div><div class="ttdoc">Required math function: Multiplication of a scalar with a tensor.</div><div class="ttdef"><b>Definition:</b> aiopti_sgd.h:98</div></div>
<div class="ttc" id="astructaiopti__sgd_html_a4be2a7d03bb9aeca3a064739b167098a"><div class="ttname"><a href="structaiopti__sgd.html#a4be2a7d03bb9aeca3a064739b167098a">aiopti_sgd::momentum</a></div><div class="ttdeci">void * momentum</div><div class="ttdoc">aiscalar: Momentum(set to null to save optimization memory)</div><div class="ttdef"><b>Definition:</b> aiopti_sgd.h:65</div></div>
<div class="ttc" id="astructaiopti__sgd_html_a5f5b55cad6c306233a8e4510d1773244"><div class="ttname"><a href="structaiopti__sgd.html#a5f5b55cad6c306233a8e4510d1773244">aiopti_sgd::tensor_sub</a></div><div class="ttdeci">void(* tensor_sub)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)</div><div class="ttdoc">Required math function: Element wise tensor subtraction.</div><div class="ttdef"><b>Definition:</b> aiopti_sgd.h:80</div></div>
<div class="ttc" id="astructaiopti__sgd_html_a7674445f16490c6cacdb03157feab8c7"><div class="ttname"><a href="structaiopti__sgd.html#a7674445f16490c6cacdb03157feab8c7">aiopti_sgd::tensor_add</a></div><div class="ttdeci">void(* tensor_add)(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)</div><div class="ttdoc">Required math function: Element wise tensor addition.</div><div class="ttdef"><b>Definition:</b> aiopti_sgd.h:89</div></div>
<div class="ttc" id="astructaiopti__sgd_html_a76e9fa4cf381a685a5df819a57737e64"><div class="ttname"><a href="structaiopti__sgd.html#a76e9fa4cf381a685a5df819a57737e64">aiopti_sgd::base</a></div><div class="ttdeci">aiopti_t base</div><div class="ttdoc">Inherited field members from general optimizer struct.</div><div class="ttdef"><b>Definition:</b> aiopti_sgd.h:57</div></div>
<div class="ttc" id="astructaiopti__sgd_html_aa0c5520df9a1bfa236b1ef7eddeb3553"><div class="ttname"><a href="structaiopti__sgd.html#aa0c5520df9a1bfa236b1ef7eddeb3553">aiopti_sgd::zero_tensor</a></div><div class="ttdeci">void(* zero_tensor)(aitensor_t *tensor)</div><div class="ttdoc">Required math function: Sets the elements of a tensor to zero.</div><div class="ttdef"><b>Definition:</b> aiopti_sgd.h:107</div></div>
<div class="ttc" id="astructaiopti_html"><div class="ttname"><a href="structaiopti.html">aiopti</a></div><div class="ttdoc">AIfES optimizer interface.</div><div class="ttdef"><b>Definition:</b> aifes_core.h:438</div></div>
<div class="ttc" id="astructaitensor_html"><div class="ttname"><a href="structaitensor.html">aitensor</a></div><div class="ttdoc">A tensor in AIfES.</div><div class="ttdef"><b>Definition:</b> aifes_math.h:89</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_1e5d3661ed79af157d57e64a38265d09.html">basic</a></li><li class="navelem"><a class="el" href="dir_90008ee2b0f86999412b56217da88d54.html">base</a></li><li class="navelem"><a class="el" href="dir_a6118b80a1160589fd2e088758244a4b.html">aiopti</a></li><li class="navelem"><a class="el" href="aiopti__sgd_8h.html">aiopti_sgd.h</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
